When docking with your base, first make sure that the base belongs to you and that your velocity is very slow. If you deploy your bases near an asteroid field, that base will be a supply station for more bases and energy. You must, however, wait for the base to regenerate supplies.
Base deployment always occurs behind your ship and can be detonated anytime. You cannot detonate a base in another cluster without “warping” to it first.